#pragma once

#include <QtGui>

class SeparatorButton : public QAbstractButton
{
public:
	SeparatorButton(int st = 0);
private:
	virtual void paintEvent(QPaintEvent *e);
private:
	int style;
};

class ImageButton : public QAbstractButton {

	Q_OBJECT

public:
	ImageButton(QString i = "", 
		QString fileName = "", 
		QString toolTip = "");
	void unSelect();
	QString id;
signals:
	void moveStarted();
	void moveWindow(QPoint location);
	void moveFinished();
	void ButtonClick(QString id);

private:
	bool isUnder;
	bool isSelect;
	QPixmap pixMap;
	QPoint pos0,last;bool moving;	

	virtual bool event(QEvent *e);
	virtual void paintEvent(QPaintEvent *e);
	virtual void mousePressEvent(QMouseEvent *e);
	virtual void mouseReleaseEvent(QMouseEvent *e);
	virtual void mouseMoveEvent(QMouseEvent *e);

private slots:
	void click();
};
